import 'package:love_newf/generated/json/base/json_field.dart';
import 'package:love_newf/generated/json/home_l_ive_item_model.g.dart';
import 'dart:convert';
export 'package:love_newf/generated/json/home_l_ive_item_model.g.dart';

@JsonSerializable()
class HomeLiveItemModel {
  late int userId = 0;
  late int roomId = 0;
  late String nick = '';
  late int sex = 0;
  late String avatar = '';
  late String avatarFrame = '';
  late int age = 0;
  late String province = '';
  late int roomType = 0;
  late int onlineCount = 0;
  late String onlineAvatar = '';
  late int coverUserId = 0;
  late String anchorAvatar = '';
  late String anchorNick = '';
  late String anchorAvatarFrame = '';
  late int anchorAge = 0;
  late String anchorProvince = '';

  HomeLiveItemModel();

  factory HomeLiveItemModel.fromJson(Map<String, dynamic> json) =>
      $HomeLiveItemModelFromJson(json);

  Map<String, dynamic> toJson() => $HomeLiveItemModelToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
